import re

a = 'lif is short,i use python,i love python'

r1 = re.search('lif(.*)python(.*)python', a)
# print(r1.group(0))
# print(r1.group(1))
# print(r1.group(2))
# print(r1.groups())
# print(r1.group(0, 1, 2))

r2 = re.findall('lif(.*)python(.*)python', a)
print(r2)
